#include "app_device.h"
#include "app_mqtt.h"
#include "app_pool.h"
#include "unistd.h"
#include "stdlib.h"

int main(int argc, char const *argv[])
{
    app_mqtt_init();
    app_pool_init();

    Device *device = app_device_init("/home/atguigu/workspace0722/gateway0722/test_dev_file");

    app_device_start(device);


    Message *message=malloc(sizeof(Message));
    message->conn_type=CONN_TYPE_BT;
    message->id_len=2;
    message->msg_len=2;
    char tmp[4]={0x58,0x58,0x41,0x42};
    message->payload= tmp;

    app_device_recv_from_router(device,message);

    sleep(10000);


    return 0;
}
